<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePayInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pay_infos', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('order_id')->comment('订单id');
            $table->bigInteger('user_id')->comment('用户id');
            $table->tinyInteger('pay_platform')->comment('支付平台 1：微信支付 2：余额 3：支付宝');
            $table->string('platform_number',200)->comment('支付流水号');
            $table->string('platform_status',20)->nullable()->comment('支付状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pay_infos');
    }
}
